package com.myzhouye.biz.model;/***
 *                    _ooOoo_
 *                   o8888888o
 *                   88" . "88
 *                   (| -_- |)
 *                    O\ = /O
 *                ____/`---'\____
 *              .   ' \\| |// `.
 *               / \\||| : |||// \
 *             / _||||| -:- |||||- \
 *               | | \\\ - /// | |
 *             | \_| ''\---/'' | |
 *              \ .-\__ `-` ___/-. /
 *           ___`. .' /--.--\ `. . __
 *        ."" '< `.___\_<|>_/___.' >'"".
 *       | | : `- \`.;`\ _ /`;.`/ - ` : | |
 *         \ \ `-. \_ __\ /__ _/ .-` / /
 * ======`-.____`-.___\_____/___.-`____.-'======
 *                    `=---='
 *
 * .............................................
 *          佛祖保佑             永无BUG
 */

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.persistence.*;
import lombok.Data;

/**
 * @program: game01
 * @description: 工厂模板
 * @author: 那条蠢鱼
 * @create: 2025-11-05 11:12
 **/
@Entity
@Table(name = "factory_template") // 数据库表名
@Data
@Schema(name = "工厂模板")
public class FactoryTemplate {
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Schema(description = "模板ID")
    private Long id;

    @Column(nullable = false, unique = true)
    @Schema(description = "模板名称（如：初级木材厂、高级铁矿厂）")
    private String templateName;

    @ManyToOne(fetch = FetchType.EAGER, optional = false)
    @JoinColumn(name = "product_id", nullable = false)
    @Schema(description = "生产的产品类型（关联ProductItem实体）")
    private ProductItem product;

    @Column(nullable = false)
    @Schema(description = "基础生产速度（秒/个）")
    private double productionSpeed;

    @Column(nullable = false)
    @Schema(description = "基础加速属性（百分比，如0.2表示20%）")
    private double acceleration;

    @Column(name = "warehouse_size", nullable = false)
    @Schema(description = "仓库容量上限")
    private int warehouseSize;

    @Column(nullable = false)
    @Schema(description = "模板是否启用")
    private boolean enabled = true;
}
